package com.fine.spark.connector.mysql.beans

import com.fine.spark.connector.base.beans.input.BaseInputConfig
import com.fine.spark.connector.mysql.input.MysqlInputWorker

import scala.beans.BeanProperty

/**
 * @author jayce
 * @date 2021/11/21 10:12 AM
 * @version 1.0
 */
class MysqlInputConfig extends BaseInputConfig {
  setType("mysql")
  setWorkerClass(classOf[MysqlInputWorker].getName)

  @BeanProperty
  var driver: String = _
  @BeanProperty
  var url: String = _
  @BeanProperty
  var user: String = _
  @BeanProperty
  var password: String = _
  @BeanProperty
  var srcTable: String = _

  override def check(): Unit = {
    super.check()
    this.checkNotBlank("driver", "url", "srcTable", "user", "password", "workerClass")
  }
}
